/**
 * Created by Maxwell on 2016/9/27.
 */
"use strict";
let request = require("../../common/util/request"),
    config = require('../../config');


let homeService = function () {
};

homeService.prototype = {
    /**
     * 首页获取tab列表内容
     * @param params
     * @returns {*}
     */
    getItemPages: function *(params) {
        var res = yield request.ajaxTransfer({
            method: "post",
            // uri : `${config.apiHost.uri}api/Crowdfunding/Item/GetItemPages?ShowType=${params['ShowType']}&Page=${params['PageSize']}`
            uri: `${config.apiHost.uri}/api/Crowdfunding/Item/GetItemPages`,
            params: {
                Page: params['Page'],
                PageSize: params['PageSize'],
                ShowType: params['ShowType']
            },
            headerType: 'Bearer',
            token: params['token']

        });
        return res.body;
    }
};

module.exports = new homeService();